/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.common.web.view;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.ScrollView;
import android.widget.TextView;
import com.qihoo.gamecenter.sdk.common.d.a.a;
import com.qihoo.gamecenter.sdk.common.i.d;
import com.qihoo.gamecenter.sdk.common.i.q;
import com.qihoo.gamecenter.sdk.common.i.s;

public class NotOpenView extends LinearLayout {
    private TextView c = null;
    private TextView d = null;
    private TextView e = null;
    boolean a = false;
    boolean b = false;
    private Context f = null;
    private c g = null;
    private d h = new d(null);
    private b i = new b(null);
    private a j = new a(null);

    public NotOpenView(Context paramContext) {
        super(paramContext);
        this.f = paramContext;
        setLayoutParams(new LinearLayout.LayoutParams(-1, -1));
        setOrientation(1);
        ScrollView localScrollView = new ScrollView(this.f);
        localScrollView.setLayoutParams(new LinearLayout.LayoutParams(-1, -1));
        localScrollView.setBackgroundColor(-1);
        localScrollView.setClickable(true);
        localScrollView.setFillViewport(true);
        addView(localScrollView);
        LinearLayout localLinearLayout1 = new LinearLayout(this.f);
        localLinearLayout1.setLayoutParams(new LinearLayout.LayoutParams(-1, -1));
        localLinearLayout1.setOrientation(1);
        localScrollView.addView(localLinearLayout1);
        LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(s.b(this.f, 158.0F), s.b(this.f,
                85.0F));
        localLayoutParams1.gravity = 17;
        localLayoutParams1.topMargin = s.b(this.f, 20.0F);
        localLayoutParams1.bottomMargin = s.b(this.f, 30.0F);
        ImageView localImageView1 = new ImageView(this.f);
        localImageView1.setLayoutParams(localLayoutParams1);
        localImageView1.setImageDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                1073741826));
        localLinearLayout1.addView(localImageView1);
        TextView localTextView1 = new TextView(this.f);
        localTextView1.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
        localTextView1.setGravity(17);
        localTextView1.setText(com.qihoo.gamecenter.sdk.common.d.a.a(a.a.S));
        localTextView1.setTextColor(-10658467);
        localTextView1.setTextSize(1, 22.0F);
        localLinearLayout1.addView(localTextView1);
        LinearLayout.LayoutParams localLayoutParams2 = new LinearLayout.LayoutParams(-1, -2);
        localLayoutParams2.bottomMargin = s.b(this.f, 25.0F);
        localLayoutParams2.topMargin = s.b(this.f, 25.0F);
        localLayoutParams2.rightMargin = s.b(this.f, 0.0F);
        localLayoutParams2.leftMargin = s.b(this.f, 0.0F);
        ImageView localImageView2 = new ImageView(this.f);
        localImageView2.setLayoutParams(localLayoutParams2);
        localImageView2.setScaleType(ImageView.ScaleType.FIT_XY);
        localImageView2.setImageDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                1073741827));
        localLinearLayout1.addView(localImageView2);
        LinearLayout localLinearLayout2 = new LinearLayout(this.f);
        localLinearLayout2.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
        localLinearLayout2.setGravity(17);
        localLinearLayout1.addView(localLinearLayout2);
        TextView localTextView2 = new TextView(this.f);
        localTextView2.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localTextView2.setText(com.qihoo.gamecenter.sdk.common.d.a.a(a.a.T));
        localTextView2.setTextColor(-5131855);
        localTextView2.setTextSize(1, 18.0F);
        localLinearLayout2.addView(localTextView2);
        this.c = new TextView(this.f);
        this.c.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        this.c.setGravity(16);
        this.c.setText(com.qihoo.gamecenter.sdk.common.d.a.a(a.a.U));
        this.c.setTextColor(-7546334);
        this.c.setTextSize(1, 18.0F);
        this.c.setOnClickListener(this.h);
        this.c.setCompoundDrawablesWithIntrinsicBounds(
                com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat", 1073741828), null, null, null);
        localLinearLayout2.addView(this.c);
        LinearLayout.LayoutParams localLayoutParams3 = new LinearLayout.LayoutParams(-1, -2);
        localLayoutParams3.topMargin = s.b(this.f, 20.0F);
        LinearLayout localLinearLayout3 = new LinearLayout(this.f);
        localLinearLayout3.setLayoutParams(localLayoutParams3);
        localLinearLayout3.setGravity(17);
        localLinearLayout1.addView(localLinearLayout3);
        LinearLayout localLinearLayout4 = new LinearLayout(this.f);
        localLinearLayout4.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localLinearLayout4.setOrientation(1);
        localLinearLayout3.addView(localLinearLayout4);
        LinearLayout.LayoutParams localLayoutParams4 = new LinearLayout.LayoutParams(s.b(this.f, 86.0F), s.b(this.f,
                76.0F));
        int k = s.b(this.f, 5.0F);
        localLayoutParams4.setMargins(k, k, k, k);
        this.d = new TextView(this.f);
        this.d.setLayoutParams(localLayoutParams4);
        this.d.setGravity(17);
        this.d.setOnClickListener(this.i);
        this.d.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat", 1073741830));
        localLinearLayout4.addView(this.d);
        TextView localTextView3 = new TextView(this.f);
        localTextView3.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localTextView3.setGravity(17);
        localTextView3.setPadding(s.b(this.f, 22.0F), 0, 0, 0);
        localTextView3.setText("WIFI");
        localTextView3.setTextColor(-10658467);
        localTextView3.setTextSize(1, 18.0F);
        localLinearLayout4.addView(localTextView3);
        LinearLayout localLinearLayout5 = new LinearLayout(this.f);
        localLinearLayout5.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localLinearLayout5.setOrientation(1);
        localLinearLayout3.addView(localLinearLayout5);
        LinearLayout.LayoutParams localLayoutParams5 = new LinearLayout.LayoutParams(s.b(this.f, 86.0F), s.b(this.f,
                76.0F));
        k = s.b(this.f, 5.0F);
        localLayoutParams5.setMargins(k, k, k, k);
        this.e = new TextView(this.f);
        this.e.setLayoutParams(localLayoutParams4);
        this.e.setOnClickListener(this.j);
        this.e.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat", 1073741824));
        localLinearLayout5.addView(this.e);
        TextView localTextView4 = new TextView(this.f);
        localTextView4.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localTextView4.setGravity(17);
        localTextView4.setPadding(s.b(this.f, 22.0F), 0, 0, 0);
        localTextView4.setText("2G/3G");
        localTextView4.setTextColor(-10658467);
        localTextView4.setTextSize(1, 18.0F);
        localLinearLayout5.addView(localTextView4);
        a();
    }

    public void a() {
        if (d.a(this.f)) {
            this.d.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                    1073741830));
            this.a = true;
        }
        else {
            this.d.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                    1073741829));
            this.a = false;
        }
        if (d.b(this.f)) {
            this.e.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                    1073741825));
            this.b = true;
        }
        else {
            this.e.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                    1073741824));
            this.b = false;
        }
    }

    private void b() {
        this.a = (!(this.a));
        if (this.a)
            this.d.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                    1073741830));
        else
            this.d.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                    1073741829));
    }

    private void c() {
        this.b = (!(this.b));
        if (this.b)
            this.e.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                    1073741825));
        else
            this.e.setBackgroundDrawable(com.qihoo.gamecenter.sdk.common.b.a.a(this.f, "360sdk_res/res1.dat",
                    1073741824));
    }

    public void setOnRefreshWebview(c paramc) {
        this.g = paramc;
    }

    public static abstract interface c {
        public abstract void a();
    }

    private class a implements View.OnClickListener {
        public void onClick(View paramView) {
            if (d.c(NotOpenView.b(NotOpenView.this))) {
                q.a(NotOpenView.b(NotOpenView.this), com.qihoo.gamecenter.sdk.common.d.a.a(a.a.Z), 0, 80);
            }
            else {
                boolean bool = d.b(NotOpenView.b(NotOpenView.this), !(NotOpenView.this.b));
                String str = (NotOpenView.this.b) ? com.qihoo.gamecenter.sdk.common.d.a.a(a.a.V)
                        : com.qihoo.gamecenter.sdk.common.d.a.a(a.a.W);
                q.a(NotOpenView.b(NotOpenView.this),
                        String.format(com.qihoo.gamecenter.sdk.common.d.a.a(a.a.Y), new Object[] { str }), 0, 80);
                if (!(bool))
                    return;
                NotOpenView.d(NotOpenView.this);
            }
        }
    }

    private class b implements View.OnClickListener {
        public void onClick(View paramView) {
            d.a(NotOpenView.b(NotOpenView.this), !(NotOpenView.this.a));
            String str = (NotOpenView.this.a) ? com.qihoo.gamecenter.sdk.common.d.a.a(a.a.V)
                    : com.qihoo.gamecenter.sdk.common.d.a.a(a.a.W);
            q.a(NotOpenView.b(NotOpenView.this),
                    String.format(com.qihoo.gamecenter.sdk.common.d.a.a(a.a.X), new Object[] { str }), 0, 80);
            NotOpenView.c(NotOpenView.this);
        }
    }

    private class d implements View.OnClickListener {
        public void onClick(View paramView) {
            if (NotOpenView.a(NotOpenView.this) != null)
                NotOpenView.a(NotOpenView.this).a();
            NotOpenView.this.setVisibility(8);
        }
    }
}